
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    
	<h:head>
	
		<h:outputStylesheet library="css" name="main.css" />
	    
	    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
		
	    <title>Sistema de Administração</title>
	    
		<style type="text/css">
		
			body {
				background: url("#{resource['img:/homeMacOSX/macback2.jpg']}") no-repeat center center fixed !important;
				
			}
			
			.ui-menuitem-icon.ui-icon.appleIcon {
				background: url("#{resource['img:/homeMacOSX/appleIcon.png']}") no-repeat;
	            width:16px;
	            height:16px;
	            border-radius:0px;
			}
	
		</style>
	    
	</h:head>
	
	<h:body>
		<h:form>
			<p:growl id="growl" 
					 showDetail="true" 
					 life="90000" 
					 autoUpdate="true" 
					 redisplay="false" 
					 infoIcon="#{resource['img:good.png']}" 
					 rendered="#{facesContext.maximumSeverity != 'FATAL 3'}" /> 

				<p:outputPanel autoUpdate="true" >
					<p:messages id="mensagens" 
								rendered="#{facesContext.maximumSeverity eq 'FATAL 3'}" 
								showDetail="false" 
								showSummary="true" />
								
				</p:outputPanel>
			
			
	
			<p:menubar>
				<p:submenu icon="appleIcon" label=" ">
					<p:menuitem value="About This Mac" url="#" onclick="PF('info').show();"  />
				</p:submenu>
						
				<p:submenu label="Cadastros">

					<p:menuitem value="List Dogs"
					            icon="ui-icon-extlink"
					            ajax="true"
					            actionListener="#{dogListarBean.viewListDogs()}" />

					<p:menuitem value="Create Dog"
					            icon="ui-icon-extlink"
					            actionListener="#{dogCRUDBean.openDialog('createDog')}" />

					<p:menuitem value="Create Cliente"
					            icon="ui-icon-extlink"
					            actionListener="#{dogCRUDBean.openDialog('criarCliente')}" />


					<p:menuitem value="Criar Tipo de Prancha"
					            icon="ui-icon-extlink"
					            actionListener="#{tipoPranchaCRUDBean.openDialog('criarTipoPrancha')}" />
				</p:submenu>
				
				<p:submenu label="Edit">

					<p:menuitem value="Chart Dogs"
					            icon="ui-icon-extlink"
					            ajax="true"
					            actionListener="#{dogListarBean.viewChartDogs()}" />

					<p:menuitem value="Gráfico Clientes"
					            icon="ui-icon-extlink"
					            ajax="true"
					            actionListener="#{clienteListarBean.viewChartClientes()}" />
					
					<p:menuitem value="Desfazer" url="#" styleClass="undo" helpText="‚åòZ" />

					<p:menuitem value="Refazer" url="#" styleClass="redo" helpText="‚åòY" />

				</p:submenu>
				
				<p:submenu label="#{msgs.logout}" >
					<p:menuitem value="#{msgs.logout}" 
								action="#{loginBean.logOut()}" 
								update="@all" />
					
				</p:submenu>
			</p:menubar>
			
			
			
			<!-- Sistema -->
			
			<p:dialog header="About This Mac" 
					  draggable="true"
					  maximizable="false"
					  closeOnEscape="true"
					  resizable="false"
					  widgetVar="info"
					  id="info" 
					  showEffect="fade" 
					  hideEffect="fade">
				<h:form>
					<h:panelGrid columns="1" style="width:100%;text-align:center;">
						<p:graphicImage value="#{resource['img:/homeMacOSX/apple_logo.png']}" />
						<h:outputText value="Devilkenshim MAC OSX" style="font-size:16px"/>
						<h:outputText value="Version 0.5.7" />
					</h:panelGrid>
					
					<h:panelGrid columns="2">
						<h:outputText value="Processor" style="font-weight:bold"/>
						<h:outputText value="2.5 GHz Intel I5" />
						
						<h:outputText value="Memory" style="font-weight:bold"/>
						<h:outputText value="8 GB 1800 MHz DDR3 SDRAM" />
						
						<h:outputText value="Startup Disk" style="font-weight:bold"/>
						<h:outputText value="Devilkenshim HD" />
					</h:panelGrid>
					
				</h:form>
			</p:dialog>
			
		
			<!-- Criar Cachorro -->
			<p:dialog widgetVar="createDog"
					  id="createDog"
					  header="Criar Cachorro" 
					  draggable="true"
					  maximizable="true"
					  minimizable="true"
					  closable="true"
					  closeOnEscape="true"
					  resizable="true" 
					  showEffect="fade" 
					  hideEffect="fade"
					  height="200"
					  width="270" >
					  
	
					<ui:include src="/pages/protected/admin/createDog.xhtml"/>
	
			</p:dialog>
			

			<!-- Criar Tipo Prancha -->
			<p:dialog widgetVar="criarTipoPrancha"
					  id = "criarTipoPrancha"
					  header="#{msgs.criarTipoPrancha}" 
					  draggable="true"
					  maximizable="true"
					  minimizable="true"
					  closable="true"
					  closeOnEscape="true"
					  resizable="true" 
					  showEffect="fade" 
					  hideEffect="fade"
					  height="200"
					  width="300" >
	
					<ui:include src="/pages/protected/admin/criarTipoPrancha.xhtml"/>
	
			</p:dialog>
			

			<!-- Criar Cliente -->
			<p:dialog widgetVar="criarCliente"
					  id = "criarCliente"
					  header="Criar Novo Cliente" 
					  draggable="true"
					  maximizable="true"
					  minimizable="true"
					  closable="true"
					  closeOnEscape="true"
					  resizable="true" 
					  showEffect="fade" 
					  hideEffect="fade"
					  height="350"
					  width="400" >
	
					<ui:include src="/pages/protected/admin/criarCliente.xhtml"/>
	
			</p:dialog>
			

			
			<p:dock>
				<p:menuitem label="Finder" icon="#{resource['img:/homeMacOSX/finder.png']}" actionListener="#{dogCRUDBean.openDialog('criarCliente')}" />
				<p:menuitem label="Terminal" icon="#{resource['img:/homeMacOSX/terminal.png']}" actionListener="#{clienteListarBean.viewListClientes()}" />
				<p:menuitem label="Safari" icon="#{resource['img:/homeMacOSX/safari.png']}" url="#" />
				<p:menuitem label="iTunes" icon="#{resource['img:/homeMacOSX/itunes.png']}" url="#"/>
				<p:menuitem label="iChat" icon="#{resource['img:/homeMacOSX/ichat.png']}" url="#"/>
				<p:menuitem label="Trash" icon="#{resource['img:/homeMacOSX/trash.png']}" url="#"/>
			</p:dock>
			
		    
		    <p:stack icon="#{resource['img:/stack/stack.png']}">
				<p:menuitem value="Aperture" icon="#{resource['img:/stack/aperture.png']}" url="#"/>
				<p:menuitem value="Photoshop" icon="#{resource['img:/stack/photoshop.png']}" url="#"/>
				<p:menuitem value="Coda" icon="#{resource['img:/stack/coda.png']}" url="#"/>
				<p:menuitem value="Safari" icon="#{resource['img:/stack/safari.png']}" url="#" />
				<p:menuitem value="Finder" icon="#{resource['img:/stack/finder.png']}" url="#" />
			</p:stack>
		    
		</h:form>
		
	</h:body>
</html>